package org.example.studentsystem_back.controller;

import jakarta.annotation.Resource;
import org.example.studentsystem_back.common.CommonResponse;
import org.example.studentsystem_back.domain.RP;
import org.example.studentsystem_back.dto.PageDTO;
import org.example.studentsystem_back.service.RPService;
import org.example.studentsystem_back.vo.rewardMangeVo.PageRewardVo;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

@RestController
@Valid
public class RPController {
    @Resource
    RPService rpService;
    //分页查询奖惩信息
    @PostMapping("/RPs/page")
    public CommonResponse<PageRewardVo> getRPsByPage(@RequestBody PageDTO pageDTO){
        return rpService.getRPsByPage(pageDTO);
    }
    //根据userId查询奖惩信息
    @PutMapping("/RPs/{userId}")
    public CommonResponse<RP> updateRP(@PathVariable("userId") String userId){
        return null;
    }
}
